package org.example.myleet.rosalind.hamm;

public class Solution {
    public int hammingDistance(String input) {
        String[] sequences = input.split("\n");
        int hammingDistance = 0;
        for (int i = 0; i < sequences[0].length(); ++i) {
            if (sequences[0].charAt(i) != sequences[1].charAt(i)) {
                ++hammingDistance;
            }
        }
        return hammingDistance;
    }

    public static void main(String[] args) {
        Solution solution = new Solution();
//        System.out.println(solution.hammingDistance("GAGCCTACTAACGGGAT\n" +
//                "CATCGTAATGACGGCCT"));
        System.out.println(solution.hammingDistance("TCTTGATAGCGACGCAAAGTTGACACGGAATGTAAATCATATCATGCCACTCCGCTAAATAGTGAATCACTTTGCCGCCCCATTCTGTGATGTTAGGCAGCTTCTCATCACCTGCTACCCTGCACCGAACGTGTAGCGAAGGTGAGTTGCCTAAGTAAGTCCACGCCACGACTTATTCTCCTCGGCCCCCTGCCGTTGGCCGCATATCTTTGACTCCACCTCGGCCCTTCTGCACGGGAACGTCCTTTCCTAATAATTTTAGCTATGCGGCTACTATATTTTCCGTGGAGGCACCAGCCCTTGTAATTGGCCCATGATTGGGCCTGCCCCGCGACGTTCTGTTATCAACGCGCGTGAGAAGGATATTGTAGGCGCCGCAGTGTATGCTCGCGTTGTTGTGGGTACTGACGGGACAATGGAGCCACCGAATAAATATAATTGCACTATTTTATTTACACGATGTGATATTGGTAATCTTCAAAAACGTCCTTAAAGCAAGTCAGTGAGGAACTCTTTTAACCTTTCGTTATAGAATCACGTCTGTCGCGCGCGGCGAGCGCCGGTGTTTTCGATCCCACTACGCAGACTGGCGTCTCACAATAATTAGGTTAGCGAAGTCATACGTGTTTTAATCCCTAAGCGTAAGGGATCAGCCGAACAAGAATGAGCTAAGGCGTCCAGCATCAAAATTATTTACGCTTTAGGTCCGCACCTAAGACCGCGACATGAACTGCCTATGAGACATGGCTGGAGTAGAGCCGCACTAGCGATGCACTTAACCCTTCATGCAGGTAACTAGTTTCCAGACCTCGATTTTCGAGGGGATGTTTCCGTGATCTGTCGAGCACCCGAATCTCACTGCCAGAGATCAGCCAGAGAAGTGATAGTTTCATGAGCATCCGGTCCCTAGGGTCTCTGAGTGTGAGATTTTCCAGACCATAGTCAT\n" +
                "GATTTATATAGCAGACGACACGACGCCGAATCTTGATCACACCAGAGGTGTTTGGTCATCATTTATTCTGGAAGCCTTAATATATTCAGCGGTTGTACAACTTCTGATCATCTGGAAGTCTCCGCCCACTGTCAACCAAAGAGACGTTGAGTACTGAAGCCTACCCCACGAAACATCCTAACAGGTCTCATGCGGGTGGCGGCACTTTTTGTATGCCACCACCGAGGTGTTGCGCGGGAGTGGGATTCTCTTATTATTTGCCTGCTACCCCTACTGTATCTTGCGCGAACGCGTCAGCCGATGTACGAGGTCCCTGGTTGATCCTAGCTCGCGATTCTCTGGCAGGCTAGCGCTGATAACCATAATTGTTGTAGCAACGGGGTCTTATATAGGGGGTGCGGACACGGGCGGATCAATCTGGCCACCCGTTGAAAGTACATTACGTATTGTAAATAGGACAAAATACAGTGTTTTTCTGACGGAAAATCGTTGAAGCTACTTAGTGAAGTTAAAGGGCGACTGTTAATGGAGGAACTAGCTCGTAACCGCCTGTGGATTGCCGGCCTACAGGACCTTTTAACGGCAGCGGGGTTCGGACAAAATTTAAATGTTGACAGTAACCGTAGTCTCAATCACAATACATCAAGGAAAAATCTGTCTATGACGCGCGAAGGGTCCCAACCTCTGAAGGCAATAAGCTTCACGTCGGTGTTACGGACTATGCCTGTGACTTGCGTTTCGGGATTACAGGAGTGTTGATGTCCTCGCCATTCTAATAGGCAACCCAACGGGCAGGTTCTTTGTTAGCCCCAATTAACGTGTACTAGTGCATCAATTCTTTTAAACGTGAGATCCACATCGCTAAAGAGCCGCGAGCGTAATACTTATCCCTTAACAGTCAGAGTCCACTCGTCATAGGGCCTGCGTTATGAGAAAGCCTATACAC"));
    }
}
